#!/system/bin/mksh

#
# By dsixda
# Originally created for Galaxy S2 and its variants
#

mount -o remount rw /system
cd /preload/symlink/system/app

# Can't create array with /sbin/sh, hence we use mksh
apk_list=( `ls | grep .apk` )
odex_list=( `ls | grep .odex` )
items=${apk_list[*]}" "${odex_list[*]}

for item in ${items[@]}
do
  ln -s /preload/symlink/system/app/$item /system/app/$item 
done

